import { Router } from 'hyper-express';
import requireUser from '../../../middlewares/auth/requireUser';
import cache from '../../../middlewares/cache';
import rowLevelPermission from '../../../middlewares/auth/rowLevelPermission';
//#region AutoCreateCode
import { uctooMinishopOrderAftersaleController } from '../../../controllers';
const uctoominishopOrderAftersaleRouter = new Router();
const minishopOrderAftersaleController = new uctooMinishopOrderAftersaleController();

uctoominishopOrderAftersaleRouter.post('/add', requireUser, minishopOrderAftersaleController.add);
uctoominishopOrderAftersaleRouter.post('/edit', requireUser, rowLevelPermission('uctoo/minishop_order_aftersale'), minishopOrderAftersaleController.edit);
uctoominishopOrderAftersaleRouter.post('/del', requireUser, rowLevelPermission('uctoo/minishop_order_aftersale'), minishopOrderAftersaleController.delete);

//For getting minishopOrderAftersale with permission control
uctoominishopOrderAftersaleRouter.get('/:id', requireUser,  rowLevelPermission('uctoo/minishop_order_aftersale'), minishopOrderAftersaleController.getSingle);
uctoominishopOrderAftersaleRouter.get('/:limit/:page', requireUser,  rowLevelPermission('uctoo/minishop_order_aftersale'), minishopOrderAftersaleController.getMany);
uctoominishopOrderAftersaleRouter.get('/:limit/:page/:skip', requireUser,  rowLevelPermission('uctoo/minishop_order_aftersale'), minishopOrderAftersaleController.getMany);

//#endregion AutoCreateCode
export default uctoominishopOrderAftersaleRouter;
